export const formatDateTime = (date) => {
    if (!date) return ''
    const d = new Date(date)
    const pad = (n) => n.toString().padStart(2, '0')

    return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`
}